<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly ="Ngilead.Test.Resources" namespace="Ngilead.Test.Models.Stateless">
  <class name="Message" table="message">
    <id name="Id" column="idmessage" type="System.Int64">
      <generator class="native"/>
    </id>
    <version name="Version"     column="version"      type="System.Int32"/>
    <property name="Text"       column="content"      type="System.String"      length="255"      not-null="true"/>    
    <property name="Date"       column="Date"         type="System.DateTime"                      not-null="true"/>

    <many-to-one name="Author"  column="iduser"       class="User"                                not-null="true"/>        
    <map name="Keywords" table="message_keywords" cascade="all, delete-orphan">
        <key column="idmessage"/>
        <index column="Word"                          type="System.String"      length="45"/>
        <element column="Value"                       type="System.Int64"/>
  	</map>
  </class>
</hibernate-mapping>
